from django.urls import path, include
from rest_framework.routers import DefaultRouter

from Apps.Article import views

router = DefaultRouter()  # 实例化router

# 注册user
router.register(r'articles', views.ArticleViewSet, basename='articles')
router.register(r'createarticles', views.CreateArticleViewSet, basename='articles')
router.register(r'comments', views.CommentViewSet, basename='comments')
router.register(r'categorys', views.CategoryViewSet, basename='categorys')
router.register(r'tags', views.CategoryViewSet, basename='tags')

urlpatterns = [
    path('', include(router.urls)),
]
